package cn.iocoder.yudao.module.brokerage.merchant.job;

import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.brokerage.merchant.service.BrokerageMerchantRecordService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 佣金解冻 Job
 *
 * @author 山野羡民
 * @deprecated 不通过定时任务触发
 */
@Deprecated
@Component
public class BrokerageMerchantRecordUnfreezeJob implements JobHandler {

    @Resource
    private BrokerageMerchantRecordService brokerageMerchantRecordService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = brokerageMerchantRecordService.unfreezeRecord();
        return StrUtil.format("解冻佣金 {} 个", count);
    }

}
